<div class="wrap">
  <div id="icon-index" class="icon32"></div>
  <h2><?php e($pageTitle) ?></h2>
  <div id="grid-wrap">
    <table id="productlist" style="display:none"></table>
  </div>

              <div id="popup" class="abs" style="display:none;">
                <div class="rel">
                  <table id="popup_table">
                    <tbody>
                      <tr>
                        <td class="tl"></td>
                        <td class="tm"></td>
                        <td class="tr"></td>
                      </tr>
                      <tr>
                        <td class="ml"></td>
                        <td class="mm">
                          <div id="popup_content">
                            <div class="wrap fLeft"><h2 id="popup-title" style="padding-top:0;"></h2></div>
                            <div id="popup-message"></div>
                            <div id="popup-progress" class="fRight" style="visibility:hidden;"></div>
                            <div class="clear"></div>

                                <div id="product-wrap" class="popup_content" style="display:;">
                                  <form id="form-product" action="<?php e($this->base); ?>/admin/products/update" method="post" class="infotxt" onsubmit="return save()">
                                    <div class="fLeft" style="width:300px;">
                                          <table border="0" cellpadding="2" cellspacing="3" width="100%">
                                            <tbody>
                                              <tr>
                                                <td width="133" align="right" class="infotxt"><span class="style16">*</span>&nbsp;<?php __('Product Code'); ?> :</td>
                                                <td class="infotxt"><input type="text" id="code" name="code" class="input req" /></td>
                                              </tr>
                                              <tr>
                                                <td align="right" class="infotxt"><span class="style16">*</span>&nbsp;<?php __('Product Name'); ?> :</td>
                                                <td class="infotxt"><input type="text" id="name" name="name" class="input req" /></td>
                                              </tr>
                                              <tr>
                                                <td align="right" valign="top" class="infotxt" style="padding-top:6px;">&nbsp;<?php __('Category'); ?> :</td>
                                                <td class="infotxt">
                                                  <select id="category_id" name="category_id" class="select">
                                                    <option value="">select..</option>
<?php foreach ($category as $id=>$name) { ?>
                                                    <option value="<?php e($id); ?>"><?php e($name); ?></option>
<?php } ?>
                                                  </select>
                                                </td>
                                              </tr>
                                              <tr>
                                                <td align="right" class="infotxt"><span class="style16">*</span>&nbsp;<?php __('BV'); ?> :</td>
                                                <td class="infotxt"><input type="text" id="bv" name="bv" class="input req" /></td>
                                              </tr>
                                            </tbody>
                                          </table>
                                    </div>
                                    <div class="fRight" style="width:305px; margin-left:30px;">
                                          <table border="0" cellpadding="2" cellspacing="3" width="100%">
                                            <tbody>
                                              <tr>
                                                <td align="right" class="infotxt">&nbsp;<?php __('Cost Price'); ?> :</td>
                                                <td class="infotxt">USD <input type="text" id="cost" name="cost" class="input" style="width: 110px;" /></td>
                                              </tr>
                                              <tr>
                                                <td align="right" class="infotxt">&nbsp;<?php __('Selling Price'); ?> :</td>
                                                <td class="infotxt">USD <input type="text" id="price" name="price" class="input" style="width: 110px;" /></td>
                                              </tr>
                                              <tr>
                                                <td align="right" valign="top" class="infotxt" style="padding-top:6px;">&nbsp;<?php __('Package Include Code'); ?> :</td>
                                                <td class="infotxt">
                                                  <textarea id="include_ids" name="include_ids" class="input"></textarea>
                                                </td>
                                              </tr>
                                            </tbody>
                                          </table>
                                    </div>
                                    <div class="clear"></div>
                                    <div style="width:635px;">
                                          <table border="0" cellpadding="2" cellspacing="3" width="100%">
                                            <tr>
                                              <td width="133" align="right" valign="top" class="infotxt" style="padding-top:6px;">&nbsp;<?php __('Description'); ?> :</td>
                                              <td class="infotxt">
                                                <textarea id="description" name="description" class="input" style="width:478px; height:75px;"></textarea>
                                              </td>
                                            </tr>
                                            <tr>
                                              <td colspan="2" class="infotxt"><span class="style16">*</span>&nbsp;<b><?php __('Required Field'); ?></b></td>
                                            </tr>
                                          </table>
                                    </div>
                                    <div class="center popupActions">
                                      <input type="hidden" id="id" name="id" value="" />
                                      <input type="submit" value="Save" />
                                      <input type="button" value="Cancel" onclick="closePopup();" />
                                    </div>
                                  </form>
                                </div>
                          </div>
                        </td>
                        <td class="mr"></td>
                      </tr>
                      <tr>
                        <td class="bl"></td>
                        <td class="bm"></td>
                        <td class="br"></td>
                      </tr>
                    </tbody>
                  </table>
                  <div title="Close" id="popup_close" onclick="closePopup();"></div>
                </div>
              </div>
</div>

<script>
var _webroot  = '<?php e($this->base); ?>';
var _products = <?php echo is_array($products) ? json_encode($products) : '[]'; ?>;
<?php $this->addScript('Ext.onReady(function() { init(); });'); ?>
</script>